package com.waitingresult.system.controller;

import com.waitingresult.common.base.model.Result;
import com.waitingresult.system.service.DictService;
import com.waitingresult.system.entity.Dict;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import static com.waitingresult.common.constant.ApiUrlConstant.SYSTEM_API;

/**
 * 数据字典
 */
@RestController
@RequestMapping(SYSTEM_API + "dict")
public class DictController {
    @Resource
    private DictService dictService;

    @PostMapping("index")
    public Result<Object> index(@RequestBody Dict dict) {
        return Result.success("ok", dictService.list(dictService.getlmdQuery(dict)));
    }

    @PostMapping("select")
    public Result<Object> select() {
        return Result.success("ok");
    }

    @PostMapping("get")
    public Result<Object> get() {
        return Result.success("ok");
    }

    @PostMapping("add")
    public Result<Object> add() {
        return Result.success("ok");
    }

    @PostMapping("edit")
    public Result<Object> edit() {
        return Result.success("ok");
    }

    @PostMapping("delete")
    public Result<Object> delete() {
        return Result.success("ok");
    }
}
